Program execution tracing system improvements

ABSTRACT

A tracing program method that copies into an area within a tracing program each instruction to be executed and traced in a manner which makes each traced instruction subservient to the tracing program. A hardware instruction counter of the computer system addresses the tracing program, rather than the program being traced. A programmed instruction counter controlled by the tracing program maintains the address within the traced program of its next instruction to be executed and traced. While being traced, the traced program is effectively executing its data using the same instruction sequence that it would use on the same data as if the tracing program was not in the system and as if the traced program was alone operating on its data. The tracing method can control the entire computer system while tracing the programs that are being executed by the system. The tracing method can wholly or partially trace a program by sampling it over a cycle determined by time or by instruction count, or by an overriding manual control. When not tracing, the tracing program can go into a quiescence state, therein it retains control of the system in preparation for later tracing, but permits a speedup in the execution of subservient instructions. The tracing method requires neither machine interrupts, nor modifications to the hardware or to the traced program code, for control of the computer system. The tracing method provides data for each traced instruction in a form that can be subsequently analyzed by a disclosed trace analysis program so that the output from a single run of the tracing method can be used any number of times for varying types of analyses.

Primary Examiner-Paul I. Henon Assistant Examiner.|an E. Rhoads Attorney-Hanifin and Jancin and Bernard M. Goldman 0 United States Patent [151 3,707,725 Dellheim 1 Dec. 26, 1972 [S4] PROGRAM EXECUTION TRACING [57] ABSTRACT SYSTEM IMPROVEMENTS A tracing program ethod that cop1es into an area [72] Inven 10 i L- ll, P ughk p within a tracing program each instruction to be ex- N.Y. ecuted and traced in a manner which makes each [73] Assign; Intern-om. Balm Mum, traced instruct on subservient to the tracing program. Corporation Amonk y A hardware 1nstruct1on counter of the computer system addresses the tracmg program, rather than the [22] Filed: June 19, 1970 program being traced. A programmed instruction counter controlled by the tracing program maintains [2]] Appl' the address within the traced program of its next instruction to be executed and traced. While being [52] U.S. Cl ..444ll,340/l72.5 traced, the traced program is effectively executing its [5 1] Int. Cl. ..G06t 11/04, GOSb 17/02 data using the same instruction sequence that it would G06f/9/ l 8 use on the same data as if the tracing program was not [58] Field of Search ..340/172.5, 146.1; 235/153; n the y m and as if th tra ed program was alone 444 operating on its data.

The tracing method can control the entire computer [56] and system while tracing the programs that are being ex- UNITED STATES PATENTS ecuted by the system, The tracing method can wholly or partially trace a program by sampling it over a 3,213,427 l0/l965 Schmitt etal. ....................340/172.5 cycle determined by time or by instruction count, or 2 I966 p o etal.. 1 172-5 by an overriding manual control. When not tracing, J 9/l967 9 "340/1725 the tracing program can go into a quiescence state, Ghll'on of the in 3,366,929 lll968 Mullery et al. ....340/112.s for late, tracing, but pemms a speedup in the execw 3,415,981 l2/l968 SmIth et al. ..235/l$3 on of subservient instructions 32:13 The tracing method requires neither machine inter- 3,s4s,3s4 12/1970 Barton an ..340/172.s g': g to 3,551,659 12/1970 Forsythc ..23s/|s3 mud fl e system.

The tracing m thod provides data for each traced instruction in a form that can be subsequently analyzed by a disclosed trace analysis program so that the output from a single run of the tracing method can be used any number of times for varying types of analyses.

12 Claims, 32 Drawing Figures vstuno .c MMYSIS I? I 11* Rsumz I l 111m 0 w g 015m 1 013111, 4 2 cannon H it t EN TMCED IIISHi EXEC HQUTWE HHEEO mm H m Em. mi

was TJBYTEK PATENTED UEII 26 E172 SHEET UlUF 25 moms PROGRAM OPERATING SYSTEM PROBLEM PROGRAMS F I6. I A

sum HARDWARE SAMPLING TERMINATION OFF- coum (m-coum COMPLETED COMPLETED) T *1 1 ACTIVE me: as CYCLES DUIESCENCE CYCLES H6 1 B (NO- SAMPLING an OFF no- SAMPLING an on i SAMPLING CYCLE a BOUNDARY-1 PROGRAM 5 TMCINCPROGRAH BETNG T m H) OBJECT CODE 9- mums ROUTINE /17 om BEING PROCESSED y T ANALYSIS mus M I 8 TRACE!) INSTR. ,14

| 1 EXEC. ROUTINE L J 11 EA -1148 PSEUDO I c f 12 PSEUDO REGS. -15

mo ms PROGRAM HR M16 souuom- 2 1 WORK AREAS -18 1 moms PROGRAM 1c OUTPUT BUFFERS POST ANALYSIS ME H G 1 c ROUTINE INVENTOR JOHN L. DELLHEIM BYWMM ATTORNEY PATENTEU 05526 3. 707. 725 SHEET U2UF 25 p 1; 2 ANALYSIS SEUDO I 17/ ROUTINE "a l ANALYSIS INSTR. 0 TABLES INSTR. 1

"151K -2 (FIGS. 7A & TB)

I i (STEPS ILA-150E m T N H TRACED INSTR. EXEC. RpuTmE TRACED msrR f5 ExEc. AREA A mEA) RARnwARE REGS. (FIGS :7BTE

(STEPS |s0|9s TRACING OF lNSTR-O COMPLETED FIG.3A

PIC g OBJECT PRocRAR H msr-R-1 INSTR. sIREAR I PSEUDO ms 15 BEING rRAcEo CONTENTS OF RARowARE INSTR. o 1 ms. AT COMPLETION OF 1 l m EXEC. 0F lNSTR-O INSTR. 2 1 msTR-s COMMON TRACED INSTR. MA

Ex. ROUT- (TIER) 14 I INSTR. N ,NSTREU \MB P 0 ST EX E C](fiTfiA;

HARDWARE IC.\ 7] TRACING PROGRAM A 1 LT ANALYSIS ROUTINE I? i RARuwARE REGS.\ I TRACING PRocRAR I M 11 TRACING PROGRAM REGS. 16

CONTENTS I CONTENTS WORK AREA HARDWARE SOFTWARE PATENTEUUEBZS L972 3 707.725

SHEET UBBF 25 INSTRUCTION-1 OBTAINED 8A EXAMINED OBJECT PROGRAM f INSTR. -1 W PSEUDO REcs 1g w CONTENTS OF HARDWARE INSTR. o REGS AT COMPLETION OF INSTR. 1 j ExEc. 0F INSTR. -o 9 INSTR. 2 DDHHDW INSTR. 5 mm. TRACED INSTR. W

AREA il i 5.! E i) INSTR A Mi msm- 1 f m m}; POST-EXEC. RDDnHE 44D TRACED INSIR. t Ex E0. ROUT 14 I 2 HARDWARE REGS. I TRAGIN PROGRAM M 16 11 ms GCONTENTS TRACING PROGRAM REGS 1 CONTENTS WDRA AREA HARDWARE SOFTWARE INSTRUCTION-1 EXECUTION (BEGINNING) 3C PIC 13 OBJECT PRDDRAH r A f |NSTR.-1\ MM PSEUDO REGS1\ TRACE" CONTENTS OF HARDWARE 9 0 REGS. Ar COMPLETION m Sm 1 .E. OF HER. 0F INSTR.0 INSTR. 2 INSTR. a TRACED INSTR. 14A

l L" L E M INSTR. N EA INSTR. -1 Wm m a F0T EYEEE6lfilN E 1 TRACED INSTR. f EXEC ROUTINE m HARDWARE REGS HRWA 16 TRACING RRDDRAW REGS CONTENTS OF HARDWARE I 0F ExEc. 0F INSTR.- 0

HARDWARE SOFTWARE HARDWARE CONTENTS WORK AREA SOFTWARE PATENTEDUEC26 1972 3. 707. 725 SHEET CQUF 25 INSTRUCTION-1 EXECUTIONHNTERMEDIATE) FIG PIC OBJECT PROGRAM H WSW-1 INSTR. STREAM PsEDDD REDs BEING TRACED 1 CONTENTS OF RARDRARE 9 W 1 REGSE AT COMPLETION OF INSTR. 1 EXEC.0F msrR-1 INSTR. 2 INSTR. 5 TRACED INSTR, 4

'" ExEc. ROUTINE (TIER) 14 L INSTR, N LLLA. mam-1 A48 A TRACED INSTR. A ExEc. RounRE LEE 14C HARDWARE REGS.

\I RRM /16 CONTENTS OF HARDWARE I TRACING PROGRAM REGS REGS AT COMPLETION (,QNTENTS WORK AREA OF ExEc. lNSTR.-1

RARDRARE sDEnvARE FIG. 3E INSTRUCTION-1 EXECUTION (END) PIC 12 OBJECT PROGRAM INSTR-Z m PsEuDo REGS L BEING TRACED p g0NTENTSc0F HARDWARE A 1 E65. AT OMPLETIONOF ExEc. 0F INSTR.-1 INSTR. 2 17A INSTR. s TRACED ARsTR.

$9,??? L L E E 'JJ BEL R INSTR. N AREA M A45 AR 1 0x POST-EXECv ROUTINE 14D TRADING PROGRAM 1 UARAUSIs ROUTINE ME I 4c RARDwARE REES H HRH 6 F PROGRA" I TRACING PROGRAM REcs,

PATENTEU DEC 2 s 1972 FIG. 4A

WORD 0 BYTE POSITION RX DOUBLE INDEXING SV C NO.

OF CODE (TWO'S GOIIPL) R1 R2 REG USAGE PI C ADDRESS OF THIS DP CODE I RR mmpr. sMPE RX RS, 51

gs ONE DPERAND OPERAND EFFECTIVE ADDRESS I O PERAND EFFECTIVE ADDRESS 2 LENGTH I LENGTH 2 VARIABLE LENGTH TRACED INSTRUCTION RECORD FORMAT TRACE RECORD TD) FIG. 4

VARIABLE BLOCKED OUTPUT RECORD FORMAT gsjwo OPERANDS PHYS'CAL TRACE TRACE TRACE 1c REcoRn Em m!" RECORD 1 RECORD RECORD 7E 10 70 w HQ 5 SOFTWARE SYSTEM TRACING PROGRAM CONSOLE ADDRESS,

GENERATIVE SYSTEM RESIDENCE CARDS ADDRESS meme YA PROGRAM TRACE TAPE 7B ADDRESSES, MEMORY TRAC INC PROGRAM SIZE DESI RED FOR SOURCE couE moms ETC. (HACROI IISTRUCTION SKELETON ASSEMBLER PROGRAM couum om MACRO NSTRUCTION TRACING PROGRAM ASSEMBLY OBJECT CODE PATENTEIlnuzzs I972 30 707' 725 sum 06 or 25 FIG. 6 i km LOADIIPL) INSTALLATION ,101 TAILORED moms PROGRAM REOUEST OPERATOR TO VERIFY SYSTEM ENVIRONMENT PARAMETERS ,f FOR CURRENT TRACINC PROGRAM RUN OPERATOR CHANGES PARAMETERS 105 IF NECESSARY I TRACING PROGRAM INITIALIZES ITSELF TD REFLECT DESIRED NEEDS FOR CURRENT TRACE RUN (I.E TRACE RECORDING I/O,MEMORY CONTROLS,ERROR I04 RECOVERIES OUTPUT DEVICE SWITCHING, REALLOCATIDN SET SAMPL. CTRS.)

GENERATE OUIESCENGE CONTROL LOCATION I05 ADVISE OPERATOR BY PRINT-OUT 106 OF CONTROL LOCATION USED TO INVDKE LOUIESCENCE ROUTINE mama PROGRAM LOADS (m) 110 DESIRED OPERATING SYSTEM mo NORMAL MEMORY LOCATIONS ADVISE mama BY PRINT-OUTOF 1H SUCCESSFULIIPLI COMPLETION INITIALIZE PIC I2 TO ADDRESS OF FIRST INSTR TO BE mow menu; now 115 sums TO FICTA PATENTEOUELZB 1972 3107.725

SHEET O7OF 25 FIG. 7A FROM Elcs FROM FIG TE COPY PIC NO ONE 12O OUIESCENCE LOOP 1290 of REGISTERS 11 YES EXTERNAL CONTROL an on L A DEC REMENT No 1 OFF WPL'NG COUNTER DECREHENT ON- SAMPLING 131 COUNTER N0 fi D 129 r c L E on-counr 132 COMPLETED RESET RosARPuRc YES an no sARRuRc m x A an STORE HARDWARE REGS A INIT IA E FF 159 mu L12 0 -COUNT LOAD PSE uvo REGS mm RARRRARE REGS ENTER ANALYSIS Ro UHNE 125 LOAD ExEc TYPE TRACING T INSTR WITH PIO SUBJECT A c o nn gri 124 AUDRESR INSTR AREA 135 R 1 P I c EXMIINE 0? CODE or 1 msr. BEING TRACED 156 EXEC SUBJECT m i TRAC ED PROGRAM WITH m RAARER To 26 EXEC TYPE APPROPRIATE TIER IN SIR i RESTORE HARDWARE m'i g a" B 27 L REcs FROM H RwA mm M A J (BEGIN TIER EXECUTION) To H0 78 PAIENTEDAEE26 m1? 3. 707. 725 SHEET 08 0F 25 FROM FIG TA q) 140 (TIER. a4

1 CONTINUED) OETERMTNE ADDR. REGS.

BRANCH-TYPE N0 INSTRUCTION DETERMINE EFFECTIVE ADDRESSES T44 IS W com) CODE SET EXEC. FOLLUWING mmcATEs BRANCH TRACE!) mam AEAEAEA 142 SET BRANC H- TAKEN YES an on mm mm- SEQUENTIAL msm ADDRESS FROM W cannon AREA mm mm T sEnuEunAuzE M8 amen AouREss m TIEA TRANSFER SUBJECT msrnucnon mo TIEAZ SAVE CONTENTS OF HARDWARE REGS T0 FIG TC mmmnviczsmz I 3.707.725 SHEET UQUE 25 FROM FIG TB (TRACED INSTRUCTION g) EXECUTION ROUTINE EXANINE PSEUDO I60 CONTINUED) REDS DETERMINE CURRENT PIC VALUE AND 151 DPERAND EFFECTIVE ADDRESSES BRANCH- TAIIEN BIT ON Aovz NON-SEOUENTIAL ADVANCE m 163 ADDRESS FROM HRWA mo PIG RESET BRANCH-TAKEN an OFF mum an I64 c GENERATE INSTR swam INTRPT mos ascoan mos RECORD TO FIG TD PATENTEO 3.707.725 sum mar 25 mom no 10 G. 7E

(POST-EXECUTION TIER com.) AN mrsanupr No Pnmmc Q corona m meme PROCR YES INTERRUPTHAN c SET INTERRUPT BIT FOR 183 PENDING NON-TRACING PROGRAM IRTERRUPT m PROGRAM mrc PTHANDLING noun srons ADDRESS HIN ow PSW lnro RK A m PARAT FOR LEAVING cm; PROGRAM SET amass m 0!. w m m ADDRESS sum POST-ANALYSIS UTINE STORE PIC INTO WORK AREA SET PIC TO AD SS 497 IN NEW PS PERMIT INTERRUPT TO 198 OCCUR WITH HARDWARE FIRST EXEOUTED INSTR O0 TO FIG IA FROM FIG TC FIG, TD (TIER com "EXEC' TYPE INSTR BIT ON EXECUTE 'EXECUTE' TYPE 152T:

msm m TI EA ANO SUBJECT msm m rmz MM CONTENTS OF 8 cm POST- XEC n N R n HARDWARE ms TO E E U 0 J PSEUDC REGS EXECUTE IRSTR IN TTEA RESTORE SAVEO comm OF HARDWARE RECS "EXEC" TYPE INSTR BIT 0N CENERATE SUBJECT INSTR TRACE RECORD 1666 E W H RESET EXEC TYPE WRITE OUT BUFFER INSTR BIT OFF P Q INSERT TRACE moms) m m BLOCKED OUTPUT T RE CENERATE SAMPLING TERMINATION mm RECORD AND PUT IN T0 N0 OUTPU T RECORD CAR OUTPUT RECORD ACCEPT ANOTHER TRACE RECORD SET uo- 5mm: ns C 1 12 a T HA5 SAMPLTNC YES TERMINATION BEEN REACHED 7 N0 IN T ALIZE 5 (b 0 N COURT T0 FTC TE PATENTED mu: 2 a T972 sum 12 or 25 FIG. 8

TRACE PROGRAM OUTPUT TAPE SEE HG 4B KEYWORD INPUT PATENTEI] 15026 m2 3. 707, 7 25 SHEET 13UF 25 FIG.9A sum INITIALIZE ANALYZING PROGRAM 2 INITIALIZE commas ANALYZING PROGRAM m WW 244 Y LAST CARD E5 SCAN NEXT KEYWORD m SET KEYWORD k CONTROLS 2 24s KEYWORD YES 0R PARAMETER ERRORS GENERATE OUTPUT MESSAGES on xmmnns RESOLVED KEYWORDS AND nmsuosncs SET CORRECT AB PARAMETERS CONTROL GENERATE 'RAW" an PHASES 2 as ROUTINES 225 PATENTEBnrczs I972 FIG.9B

I TO FIG 9E) SHEET 1U OF 25 (FROM FIGOA) EDIT KEYWORDS C IN OUTPUT A FORMAT OUTPUT AREA MOVE RECORD TO BUFFER PRINT ROUTINE I TO & FROM FIOOMI GENERATE USER IFIED ANALYSIS REPORT MATIS) 237 GENERATE REPORT- GENERATING ROUTINEIS) END OF PHASE-I BEGINNING OF PHASE-2 (FROM FIGSO T we) READ NEXT PHYSICAL no on TRACING OUTPUT TAPE KIP OFF (T0 FIG. 90)

ULTIPLE 2 VOLUMES YES ' ADVISE o TOR To noun xT REEL PATENTED 3. 707. 725

SHEET ISDF 25 (mom FIG. 9B) F IG.9C

V/262 DECREMENT PROCESS coum FROM e, 90) 3 UPDATE IN FOR NEXT E \2 4 mean ITEM (T0 FIG.9E) C E R g D ITEM 266 SET YES NO END OF PHYSICAL FR CONTROLS 27? UPDATE SAMPLING 292 mean Fl COUNTER YES ERROR No YES PROVIDE INFO ABOUT PHYSICAL REC YES

HUVE r0 PRINT ASSEMBLY AREA (T0 FIGQDdb @(TU FIGBB) PATENTEDntczs 1972 3' 707 725 SHEET 15 or 25 UPDA NVOLVED or co OUNTEMS) DETAIL INFO REQUESTED MOVE (FROM FIGEQC) {j ASSEMBLY L DETERMINE 0P CODE TYPE SET SWITCHES FOR SELECTING REQUIRED ROUTINE /305 INTRPT on 0P CODE TYPE ROUTINE, PER swmcu sm (FROM FlG-QF) (T0 8. FROM HGS.9F,9H OZA-GQZJ FORMAT OUTPUT RECORD 344 PRINT ROUTINE 1 T0 a FROM Fl .sm (FROM men) G 609 NO END OF PHYSICAL RECORD 02 YES PATENTEUUECZBIBT? 3.707.725

sum 17 or 25 (mom FlGS.9B,9C) F IG.9 E

END PHASE-2 BEGIN PHASE-3 INITIALIZE PHASE 3 PRINT ROUTINE (T0 & FROM H63") 609 OBTAIN REQUIRED RE ROUTINE FROM POIN \323 TABLE EXECUTE SELECTED REPORT nourms 324 f PRINT ROUTINE (T0 a FROM H09") 609 SET up SUMMARY HEADER 52? (FROM H696, GENERATE sunmm \m PRINT ROUTINE (T0 & Fnon men) 609 (mom FIG.9B) I END PATENIEDBE I91? 3.707.725 sum 18OF 25 LL F|G.9F w

ENTER INTRPT ENTER OP CODE TYPE ROUTINE TYPE I ROUTINE (FROM FIG. 90) (FROM FIG. 90 I INTRPT CLASS ACCEPTABLE 703 SET omcnosnc (FROM ETC CONTROL INTRPT INFO REQUESTED PIC ROUTINE i (T0 a Fan! Heel) L EPROVIDE BOTH smnoaan 603 PSI LOCATIONS (BY TABLE LOOKUPI (mom was I ros I UPDATE INVOLVED K COUNTERS m (mom FIG. 9m

TIIE ROUTINE (TO & FRON FICQLI DETAIL INFO REQUESTED MOVE TO PRINT ASSEMBLY AREA I TO FICY9DI (TO FIG. 90)

PATENTEBBEII 3.707.725 sREET 1510f 25 602C V F|G.9G 6A ENTER 0P CODE ENTER 0P CODE TYPE 2 ROUTINE TYPE 3 ROUTINE TFRoR men) (FROM H390) (T FR n 69 TYPE 4 ROUTINE I TFRon F|G.9D)

EFFEcT vE ADDRESS PIC HUME RouTmE (To 1 FM m9 (T0 R ERon FIG.9I)

(T0 FIGV9F) EQEE ENTER c005 ADJUST FOR NUMBER TYPE 5 0F REGS INVOLVED (FROM FIG.9D)

ENTER 0P CODE ENTER 0P CODE TYPE 7 ROUTINE TYPE 6 ROUTINE TFRou FIG.9D) (FROM FIG.9D) 

1. Within a computer system using instructions of variable length having operation codes that also indicate the instruction lengths; the computer system operation being controlled by a program tracing method; initially inputting into said computer system said program tracing method, a program to be traced and data to be processed by said program to be traced; said program tracing method including the steps of controlling a hardware instruction counter in said computer system for accessing each next required tracing instruction in said program tracing method, said program tracing method thereafter maintaining continuous control over said computer system, loading a programmed instruction counter with a direct or indirect address of a current instruction in said program to be traced, selecting one of a plurality of program tracing method routines by interpretation of an operation code in the current instruction determined by said loading step, moving the current instruction into an assigned area provided by the selected program tracing method routine obtained by said selecting step, executing said current instruction in said assigned area under control of the selected program tracing method routine, the execution of said current instruction being with said data to be processed and with data generated from execution of any prior instructions in said program to be traced, said executing step providing generated data for subsequent execution by said program to be traced, the data generated during said executing step by each instruction in said program to be traced being the same as data which would be generated by direct execution of said program to be traced with said data to be processed, machine-recording addresses in a tracing record for said current instruction executed by said executing step, and iteratively repeating the sequence of said loading step, said selecting step, said moving step, said executing step, and said machine-recording step for each next instruction indicated by the setting of said programmed instruction counter for said program to be traced, whereby no machine interrupt is required for tracing purposes by either the program tracing method or the program to be traced, and whereby no modification is required for tracing purposes to either the hardware or to said program to be traced.
 2. Within a program tracing method as defined in claim 1 in which, the tracing operation is quiesced while said tracing program maintains control of said computer system, in which after said loading step, the following steps are included branching around said selecting step, said moving step, said executing step, and said machine-recording step for each next instruction of said program to be traced while being quiesced; and said branching step correspondingly modifying said iteratively repeating step, executing-in-place each next instruction indicated by the content of said programmed instruction counter for said program to be traced under control of said program tracing method, whereby said branching step quiesces the tracing operation.
 3. Within a program tracing method as defined in claim 2, in which the following steps are provided before said branching step, testing a program control switch for a quiescence status indication, and whereby the tracing operation continues in the absence of said testing step sensing any quiescence status indication by said program control switch.
 4. Within a program tracing method as defined in claim 2, in which the following steps are provided before said branching step resetting a control bit by external control at any time during execution of said program tracing method, activating said iteratively repeating step, and deactivating said branching step in response to said control bit being reset, whereby said program tracing method is actiVated to trace said program to be traced.
 5. Within a program tracing method as defined in claim 2, in which the following steps are provided before said branching step setting a control bit by external control at any time during execution of said program tracing method, activating said branching step and said executing-in-place step in response to said control bit being set by said setting step, whereby said program tracing method is in a quiescent state as long as said control bit is set, in which each next instruction in said program to be traced is executed without being traced but is continuously under control of said program tracing method.
 6. Within a program tracing method as defined in claim 2, in which the following steps are provided before said loading step inputting first and second parameters to control an on-count sampling period and an off-count sampling period, which are alternate periods in a tracing sampling cycle, machine-changing a current one of said on-count and off-count sampling periods in accordance with a machine-measured progression of said program to be traced, machine-testing a current state of a no-sampling bit to determine which one of said alternate periods is a current sampling period, and switching said no-sampling bit to an opposite state when said machine-testing step indicates expiration of the current sampling period, whereby during each tracing sampling cycle said program tracing method is in a quiescent state as long as said no-sampling bit indicates said off-count sampling period is current and is in an active tracing state as long as said no-sampling bit indicates said on-count sampling period is current, and whereby cyclic sampling periods of tracing are independent of any predetermined sequence of instructions in said program to be traced.
 7. Within a program tracing method as defined in claim 6, in which said machine-changing step comprises machine-computing the time for machine-execution of the current instruction of the program to be traced to determine its machine-measured progression, and decrementing the current sampling period in response to the time indicated by said machine-computing step, whereby said first and second parameters are the periods of time for the on-count and off-count sampling periods, respectively.
 8. Within a program tracing method as defined in claim 6, in which said machine-changing step includes machine-decrementing the current sampling count by one for each instruction to be executed in the program to be traced, whereby said first and second parameters are the numbers of instructions in the on-count and off-count sampling periods, respectively.
 9. Within a program tracing method for use with a computer system using instructions of variable length having operation codes that also indicate the instruction lengths, comprising the steps of inputting to the computer system a tracing program, a program to be traced, and data to be processed by said program to be traced, setting a programmed instruction counter in said tracing program with a direct or indirect address to a current traceable instruction to be executed in said program to be traced, setting a hardware instruction counter in said computer system with an address of a current tracing instruction to be executed in said tracing program, initiating execution of said tracing program with initial settings of said hardware and programmed instruction counters to the first instruction in said tracing program and in said program to be traced, respectively, accessing the operation code of the current traceable instruction at the address in said programmed instruction counter, selecting a tracing program routine by interpretation of the operation code of the current traceable instruction, signalling if said traceable instruction indicates that its following instruction to be executed in said program to be traced is a sequentially or non-sequEntially addressed instruction, recording any sequentially addressed instruction indicated by said signalling step from said program to be traced into one area in said tracing program routine, and recording any non-sequentially addressed instruction indicated by said signalling step into another area in said tracing program routine, executing any sequentially addressed instruction or any non-sequentially addressed instruction provided by said recording step within said tracing program routine without any required machine interrupt, setting into said programmed instruction counter the address of the next instruction to be executed in the program to be traced and generating a trace record based on data related to said sequentially addressed instruction as a result of said executing step.
 10. Within a program tracing method as defined in claim 9, including before said accessing step the steps of examining for and servicing any computer interrupt signals caused by the addressed instruction in said program to be traced, said interrupt not being generated for tracing said addressed instruction, and said generating step providing a trace record that includes information provided by each computer interrupt generated in the program to be traced.
 11. Within a program tracing method as defined in claim 10, in which said generating step further records into the trace record the location addresses within old and new status control words responding to a handled interrupt for said program to be traced.
 12. Initialization for a program tracing method as defined in claim 9, in said inputting step further includes generating an address of a memory location for storing a control of quiescing and active tracing states of the tracing program, outputting the address of said memory location provided by said generating step for subsequent action, and setting a bit in said memory location to control the quiescing and active tracing states of said tracing program. 